define(function(require, exports, module) {
	var $=require("zepto");
	var Mobilebone=require('mobilebone');
	var Loader=require("widgets/Loader");
	exports.init = function(page) {
		var loader=new Loader();
		loader.show();
		var obj=new Object();
		obj.parentId='tz_ad_area';
		obj.chooseId='chooseArea';
		obj.swipeId='mySwipe';
		obj.imgarr=['http://gw.alicdn.com/tps/i3/TB1MGoxGVXXXXbCXVXXdIns_XXX-1125-352.jpg_q50.jpg','http://gw.alicdn.com/tps/i4/TB1ojIzGVXXXXaoXVXXTIPs_XXX-1125-352.png'];
		var SwipeUtil=require('utils/swipeUtil');
		var swipe=new SwipeUtil();
		swipe.init(obj);
		setTimeout(function(){
			var IScroll=require('core/iscroll-lite');
			var weChatScroll = new IScroll(page.querySelector(".content"), {
				tap: true
			});
			loader.hide();
		},1000);
		
		//解决IScroll5不能点击
		/Android/i.test(navigator.userAgent) && page.addEventListener('tap', Mobilebone.handleTapEvent, false);
	};
	function refresh(myScroll,id){
		var height = window.screen.height;
		
		var h=$("#header").height();
		var f=$("#footer").height();
		console.log(h);
		var scrollerHeight=height-h-f;
		alert(scrollerHeight);
		$("#"+id).height(scrollerHeight);
		myScroll.refresh();
	}
});